<template>
  <div>
  <div style="float: left; width: 50%; text-align: left;">{{ name }}</div>

  <div style="float: left; width: 50%; text-align: right;">
    
    <button  @click="out()">退出登录</button></div>
  
  </div>
</template>

<script>
export default {
  name: "r-header",
  data() {
    return {
      name: null,
      currentTerm: null
    }
  },
  created() {
    this.name = sessionStorage.getItem("name")
    this.currentTerm = sessionStorage.getItem("currentTerm")
  },
  methods: {
    out() {
      sessionStorage.clear();
      this.$router.push('/')
    }
  }
}
</script>

<style scoped>


</style>